<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/common/layui/css/layui.css"/>
    <link rel="stylesheet" href="/css/global.css"/>
</head>
<body>
<table class="layui-hide" id="groupTable" lay-filter="groupTable"></table>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="check">查看成员</a>
    <a class="layui-btn layui-btn-warm layui-btn-sm" lay-event="allot">分配成员</a>
</script>
</body>
<script src="/common/layui/layui.js"></script>
<script src="/js/global.js"></script>
<script src="/js/tableRender.js"></script>
<script src="/js/group.js"></script>
<script>
    layui.use(['jquery', 'laytpl', 'table'], () => {
        let $ = layui.jquery,
            laytpl = layui.laytpl,
            table = layui.table;
        table.on('tool(groupTable)', (obj) => {
            let data = filterFormOnNull(obj.data);
            let event = obj.event;
            if (event === "check") {
                layer.open({
                    title: ["成员展示", 'font-size:18px'],
                    type: 2,
                    area: ["40%", "60%"], //宽高,
                    shadeClose: true, //点击遮罩关闭
                    content: ["../group/groupMemberShow.html?id=".concat(data.id), 'no'],
                    fixed: true,
                    resize: false,
                    yes: (layero, idx) => {
                        layer.close(idx);
                    },
                    cancel: (idx, layero) => {
                        layer.close(idx);
                    }
                });
            } else if (event === "allot") {
                let searchParam = "?".concat($.param(data));
                layer.open({
                    title: ["成员分配", 'font-size:18px'],
                    type: 2,
                    area: ["40%", "60%"], //宽高,
                    shadeClose: true, //点击遮罩关闭
                    content: ["../group/groupAllot.html".concat(searchParam), 'no'],
                    fixed: true,
                    resize: false,
                    yes: (layero, idx) => {
                        layer.close(idx);
                    },
                    cancel: (idx, layero) => {
                        layer.close(idx);
                    }
                });
            }
        });
    });
</script>
</html>